package com.dfqy.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Author : atyushu
 * Package : com.dfqy.pojo
 * ClassName : Appoint
 * Create : 2023/8/1 - 11:31
 * Version : v1.0
 * Description : The class of pojo for d_appoint.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("在线服务预约")
public class Appoint implements Serializable {

    @NotNull
    private long id;

    @ApiModelProperty("手机号，最大长度50")
    private String phone;

    @ApiModelProperty("用户号")
    private long userid;

    @ApiModelProperty("门店地址，最大长度80")
    private String addrbranch;

    @ApiModelProperty("症状描述，最大长度500")
    private String courseof;

    @ApiModelProperty("时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date posttime;

    @ApiModelProperty("姓名，最大长度60")
    private String uname;

    @ApiModelProperty("备注，最大长度1000")
    private String remark;

    public Appoint(String phone, long userid, String addrbranch, String courseof, Date posttime, String uname, String remark) {
        this.phone = phone;
        this.userid = userid;
        this.addrbranch = addrbranch;
        this.courseof = courseof;
        this.posttime = posttime;
        this.uname = uname;
        this.remark = remark;
    }
}
